package com.dlm.service.impl;

import com.dlm.dao.HisAddress;
import com.dlm.service.IAddressService;

/**
 * Created by ryan on 2015/4/8.
 * chong.song@alibaba-inc.com
 */
public class AddressServiceImpl implements IAddressService{

    @Override
    public HisAddress findLastAddr(String openId) throws Exception {
        String sql = "SELECT * FROM his_address ha WHERE ha.`open_id` = '" + openId + "' ORDER BY ha.`create_time` DESC LIMIT 1";
        return HisAddress.dao.findFirst(sql);
    }
}
